#ifndef __DRVDATA__H
#define __DRVDATA__H

#define USB_DT_CS_HUB 0x29
#define USB_DT_HUB_HEADER_SIZE(n)	(sizeof(struct usb_hub_header_descriptor))

/* Hub class specific Descriptor */
static const struct usb_hub_header_descriptor hub_header_desc = {
  .bLength =		USB_DT_HUB_HEADER_SIZE (6),
  .bDescriptorType =	USB_DT_CS_HUB,
  .bNbrPorts = 6,
  .wHubCharacteristics = 0x00a9,
  .bPwrOn2PwrGood = 50,
  .bHubContrCurrent = 100,
  .DeviceRemovable = 0x00,
  .PortPwrCtrlMask = 0xFF,
};

/* Full-Speed device descriptor */ //OK
struct DeviceDescriptor devdesc_hi = {
	.bLength = 0x12, 
	.bDescriptorType = 0x01, 
	.bcdUSB = 0x0200, 
	.bDeviceClass = 0x09, 
	.bDeviceSubClass = 0x00, 
	.bDeviceProtocol = 0x01, 
	.bMaxPacketSize = 0x08, 
	.idVendor = 0xAAAA, 
	.idProduct = 0xCCCC, 
	.bcdDevice = 0x0100, 
	.iManufacturer = 0x00, 
	.iProduct = 0x00, 
	.iSerialNumber = 0x00,
	.bNumConfigurations = 0x01
};

/* Full-Speed configuration descriptor */ //OK
struct ConfigDescriptor confdesc_hi = {
	.bLength = 0x09, 
	.bDescriptorType = 0x02, 
	.wTotalLength = 0x0019, 
	.bNumInterfaces = 0x01, 
	.bConfigurationValue = 0x01, 
	.iConfiguration = 0x00, 
	.bmAttributes = 0xE0, 
	.bMaxPower = 0x32
};

/* Full-Speed interface descriptor */ //OK
struct InterfaceDescriptor interdesc_hi[2] = {
{
	.bLength = 0x09, 
	.bDescriptorType = 0x04, 
	.bInterfaceNumber = 0x00, 
	.bAlternateSetting = 0x00, 
	.bNumEndpoints = 0x01, 
	.bInterfaceClass = 0x09, 
	.bInterfaceSubClass = 0x00, 
	.bInterfaceProtocol = 0x00, 
	.iInterface = 0x00
}, 
{ 0 }
};

/* Full-Speed endpoint descriptors */
struct EndpointDescriptor endpdesc_hi[3] = {
	{
		.bLength = 0x07, 
		.bDescriptorType = 0x05, 		
		.bEndpointAddress = 0x80 | 01,
		.bmAttributes = 0x03, 
		.wMaxPacketSize = 0x01,     
		.bInterval = 0x0C
	},
	{
		.bLength = 0x07, 
		.bDescriptorType = 0x05, 
		.bEndpointAddress =  0x00 | 0x02,
		.bmAttributes = 0x03, 
		.wMaxPacketSize = 0x01,     
		.bInterval = 0x0C
	},
	{
		.bLength = 0x07, 
		.bDescriptorType = 0x05, 
		.bEndpointAddress =  0x00 | 0x02,
		.bmAttributes = 0x03, 
		.wMaxPacketSize = 0x01,     
		.bInterval = 0x0C
	},
};

/* Endpoint blocks */
struct UsbEndpoint endp[3] = {
	{ 0, 0, 0 },
	{ 1, 0, 0 },
	{ 2, 0, 0 },
};

/* Intefaces */
struct UsbInterface intp = {
	0xFFFFFFFF, 0, 1,
};

#endif
